@import './element-variables';
@import './epm-variables';

/* SelectPage
----------------------------*/
div.v-selectpage {
  margin:10px;
  div.sp-input-container {

    // 表单
    div.sp-input {
      &.sp-base {
        padding:0 12px;
        height:28px;
        line-height: 28px;
        font-size:12px;
        background-color: $--color-white;
      }
      border-radius: 3px;
      border: 1px solid $--border-color-base;
      color: $--color-text-grade-2;

      // 提示文字
      span.sp-placeholder {
        margin-top:0;
        font-size:12px;
      }
    }

    // 多选
    div.sp-inputs {
      min-height:28px;
      border: 1px solid $--border-color-base;

      // 提示文字
      span.sp-placeholder {
        margin-top:0;
        font-size:12px;
      }

      // 多选标签
      span.sp-selected-tag {
        line-height:18px;
        height:20px;
        background-color: #eff1ff;
        color: $--color-primary;
        display: inline-block;
        padding: 0 10px;
        font-size: 12px;
        border: 1px solid #dee3ff;
        border-style: solid;
        border-radius:3px;
        box-sizing: border-box;
        white-space: nowrap;

        i.sp-iconfont {
          font-size:12px;
          color:#5b73ff;
        }
      }
    } 

    // 清空
    div.sp-clear {
      padding-top:2px;
    .sp-iconfont {
        display: block;
        padding:5px;
        transform:scale(.5);
        border:1px solid $--color-text-grade-3;
        border-radius: 100%;
        color: $--color-text-grade-3;
        font-size: 12px;
      }
    }

    // 箭头按钮
    div.sp-button {
      width:20px;
      box-sizing: border-box;
      padding-left:4px;
      display: flex;
      justify-content: flex-start;
      align-items: center;
      border-radius: 0 3px 3px 0;
      background-color: $--color-primary;
      color:$--color-white;

      span.sp-caret {
        margin:-4px 6px 0 0!important;
        position: static;
        border: 0 !important;
        font-family: 'element-icons' !important;
        font-style: normal;
        font-weight: normal;
        font-variant: normal;
        text-transform: none;
        line-height: 1;
        vertical-align: baseline;
        display: inline-block;
        /* Better Font Rendering =========== */
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        animation: transform 0 all;
        font-size:12px;
        &::before{
          content: "\e6df";
        }
      }
      &.open {
        span.sp-caret {
          transform: none!important;
          &::before{
            content: "\e6e1";
          }
        }
      }
    }
      
    // 表单经过状态
    &:hover {
      div.sp-input.sp-base,
      div.sp-inputs.sp-base {
        border-color:$--color-text-placeholder;
      }
    }   
    // 表单索引状态
    &.sp-open {
      div.sp-input,
      div.sp-inputs {
        border-color:$--color-primary;
      }
    }

    //禁用
    &.sp-disabled {
      div.sp-input.sp-base,
      div.sp-inputs.sp-base {
        background-color: $--background-color-base;
        border-color: $--border-color-light;
        color: $--avatar-background-color;
      }
    }
  }
}
// 下拉框同级组件
div.v-dropdown-container {
  border-radius:3px;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
  background-color:$--color-table-head;
  &.v-dropdown-no-border {
    border:1px solid $--border-color-base;
  }

  // 顶部
  div.sp-header {
    background-color: transparent;
    h3 {
      font-size:14px;
    }
    .sp-clear-all-btn,
    .sp-close-btn {
        transform:scale(.7);
      .sp-iconfont {
        color:$--color-danger;
      }
    }
  }

  // 查询
  div.sp-search {
    background-color: transparent;
    .sp-search-input {
      padding:2px 6px;
      border: 1px solid $--border-color-base;
      border-radius: 3px;
      background-color: $--color-white;
      color: $--color-text-grade-2;
      &:hover {
        border-color:$--border-color-base;
      }
      &:focus {
        border-color:$--color-primary;
      }
    }
  }

  // 列表
  div.sp-result-area {
      background-color: transparent;
      max-height:200px;
      /*height:200px;*/
      ul.sp-results {
        background-color: transparent;
        li {
            padding: 0 12px;
            height: auto!important;
            line-height: 24px;
            color: $--color-text-grade-2;
            font-size: 12px;
            &.sp-over {
              background-color: $--color-primary !important;
              color:$--color-white !important;
            }
            &.sp-selected {
              font-weight: bold;
              color:$--color-primary;
            }
        }
      }
    }

    // 分页
    div.sp-pagination {
      background-color: transparent;
      font-size:12px;
      color:$--color-text-grade-2;
      div.sp-page-info {
        line-height: 22px;
      }
      ul {
        li {
          margin-right:8px;
          &:first-child {
            margin-left: 8px;
          }
          &.sp-disabled {
            a {
                background-color: $--background-color-base;
                cursor:not-allowed;
            }
          }
          a {
            padding:2px 4px;
            height:22px;
            background-color: $--color-white;
            border:1px solid $--border-color-base;
            color:$--color-text-grade-2;

            .sp-iconfont {
              font-size:12px;
            }
            &:hover {
              color:$--color-primary;
            }
            &:focus {
              background-color:$--color-primary;
              color:$--color-white;
            }
          }
        }
      }
    }
}

/* Draggable
----------------------------*/
.draggable-item {
  width: 500px;
  padding: 4px; 
  margin-top: 4px;
  margin-left: 4px;
  background-color: #eff1ff;
  border: 1px solid #dee3ff;
  border-radius: 3px;
  font-size: 14px;
  color: $--color-primary;
  cursor:move;
}

/* SplitPane
----------------------------*/
.split-pane-demo{
  height:500px;
}
.vue-splitter-container {
  background-color: #e5e9f2 !important;
}
.splitter-pane-resizer {
  background-color: #333!important;
}

/* GridLayout
----------------------------*/
.vue-grid-item {
  background: #e5e9f2;
  border: 1px solid #d3dce6;
}


/* TreeSelect
----------------------------*/
.vue-treeselect {
  width: 100%;
  &--open {
    .vue-treeselect__control-arrow-container {
      transform: rotateZ(0);
    }

    .vue-treeselect__control {
      border-color: #5B73FF;
    }
  }

  &--focused {
    .vue-treeselect__control {
      border-color: #5B73FF !important;
      box-shadow: none !important;
    }
  }

  &--has-value {
    .vue-treeselect__control {
      height: unset !important;
    }
    .vue-treeselect__single-value{
      color: #646C9A;
      line-height: 30px;
    }

    .vue-treeselect__input-container {
      .vue-treeselect__input {
        border: #ddd solid 1px;
        height: 25px;
        min-width: 50px;
        color: #646C9A;
      }
    }
  }

  .vue-treeselect__control {
    height: 30px;
    line-height: 30px;
    display: inline-block;
    border-radius: 3px;
    font-size: 12px;
    border: 1px solid #ededed;
  }

  &__input-container {
    .vue-treeselect__input {
      border: none;
      height: 25px;
    }
  }

  &__control-arrow-container {
    height: 30px;
    line-height: 30px;
    font-family: element-icons !important;
    color: #C0C4CC;
    font-size: 12px;
    transition: transform .3s;
    transform: rotateZ(180deg);
    cursor: pointer;

    &::before {
      content: "\e6e1";
    }

    .vue-treeselect__control-arrow {
      display: none;
    }
  }

  &__value-container {
    height: 22px;
    line-height: 22px;
  }
  .vue-treeselect__placeholder{
    line-height: 28px;
  }

  .vue-treeselect__multi-value-item {
    background: #eff1fe;
    color: #5e77f7;
    padding: 0;
    height: 22px;
    line-height: 22px;
  }
  &__multi-value-label{
    max-width: 130px;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
  }

  .vue-treeselect__value-remove {
    color: #5e77f7;
  }

  &__x-container {
    line-height: 22px;
    height: 22px;
    padding-right: 3px;
  }

  &__list {
    font-size: 12px;
    color: #606266;
  }

  .vue-treeselect__checkbox--checked {
    background-color: #5e77f7;
    border-color: #5e77f7;
  }

  .vue-treeselect__label-container:hover {
    .vue-treeselect__checkbox {
      &--checked {
        background-color: #5e77f7;
        border-color: #5e77f7;
      }

      &--unchecked {
        border-color: #5e77f7;
      }

      &--indeterminate {
        background-color: #5e77f7;
        border-color: #5e77f7;
      }
    }
  }

  .vue-treeselect__checkbox--indeterminate {
    background-color: #5e77f7;
    border-color: #5e77f7;
  }
  &__option {
    background: #ffffff;
    border-left: #ffffff solid 2px;
    &--highlight {
      background: #f5f8ff;
      border-left: #5e77f7 solid 2px;
    }
  }
}